<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <script>
            // 循环
            for (var i = 1; i <= 10; i++) {
                var b=1000;
                console.log(i);
            }
            //使用var声明的变量不支持块级作用域
            console.log(b);

            for(var j=1;j<=10;j++){
                let c=90;
            }
            //使用let声明的变量支持块级作用域
            console.log(c);//报错
        </script>
    </head>
    <body>

    </body>
</html>